import {
  DashboardOutlined,
  BarChartOutlined,
  VideoCameraOutlined,
  FileTextOutlined,
  EditOutlined,
  FolderOutlined,
  InboxOutlined,
  UserOutlined,
  CalendarOutlined,
  DatabaseOutlined,
  QrcodeOutlined,
  MonitorOutlined,
  TeamOutlined,
  SafetyOutlined,
} from '@ant-design/icons-vue'

// 图标映射表
const iconMap = {
  DashboardOutlined,
  BarChartOutlined,
  VideoCameraOutlined,
  FileTextOutlined,
  EditOutlined,
  FolderOutlined,
  InboxOutlined,
  UserOutlined,
  CalendarOutlined,
  DatabaseOutlined,
  QrcodeOutlined,
  MonitorOutlined,
  TeamOutlined,
  SafetyOutlined,
}

/**
 * 根据图标名称获取对应的图标组件
 * @param iconName 图标名称
 * @returns 图标组件，如果找不到则返回默认图标
 */
export const getIconComponent = (iconName: string) => {
  return iconMap[iconName as keyof typeof iconMap] || DashboardOutlined
}

/**
 * 获取所有可用的图标名称列表
 * @returns 图标名称数组
 */
export const getAvailableIcons = () => {
  return Object.keys(iconMap)
}

export default iconMap
